﻿<UserControl x:Class="Silverlight.Navigation.Controls.MainMenu"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
    <UserControl.Resources>

        <Style x:Key="HorizontalItemsControlStyle" TargetType="ItemsControl">
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"
							VerticalAlignment="Center"
							HorizontalAlignment="Left"/>
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="MainMenuItemDataTemplate">
            <Border Background="Transparent" Margin="2,2,2,2"
                            BorderBrush="#FF000000" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4">
                <Button Content="{Binding Title}" Background="Transparent" BorderBrush="Transparent" Click="Button_Click" />
            </Border>
        </DataTemplate>

    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="Transparent">

        <ItemsControl x:Name="MainMenuItemsControl"
                      Style="{StaticResource HorizontalItemsControlStyle}"
                      ItemTemplate="{StaticResource MainMenuItemDataTemplate}" />

    </Grid>
</UserControl>
